package org.hospital.service;

import java.util.List;

import org.hospital.entity.Bill;
import org.hospital.entity.Clinic;
import org.hospital.entity.Department;
import org.hospital.entity.Project;

import com.alibaba.fastjson.JSONArray;

public interface ProjectService {
	/**
	 * 获取持久化对象
	 * 
	 * @param projectId
	 * @return
	 */
	Project getById(int projectId);

	/**
	 * merge 方法插入 数据库
	 * 
	 * @param entity
	 * @return
	 */
	Project addEntity(Project entity);

	/**
	 * merge 方法插入 数据库
	 * 
	 * @param entity
	 * @return
	 */
	Project saveEntity(Project entity);
	
	/**
	 * 获取门诊在[startTime,endTime]开过的治疗项目
	 * @param clinic
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<Project> getClinicTreatmentProject(Clinic clinic, long startTime, long endTime);
	
	/**
	 * 获取科室在[startTime,endTime]开过的治疗项目
	 * @param dpm
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	List<Project> getDepartmentTreatmentProject(int departmentId,long startTime,long endTime);
	
	/**
	 * 获取所有有效的治疗项目
	 * @return
	 */
	List<Project> getAllTreatmentProject();
	
	/**
	 * 获取所有有效的费用项目
	 * @return
	 */
	List<Project> getAllFundProject();
	
	/**
	 * 获取治疗项目内容
	 * @return [{projectId,projectName,creatorName,creatorId,unitPrice,doctorCost,clinicCost,excutorCost,type,status,alterTime,createTime}]
	 */
	JSONArray getTreatTable();
	
	/**
	 * 获取费用项目内容
	 * @return [{projectId,projectName,creatorName,creatorId,type,typeInt,status,statusInt,alterTime,createTime}]
	 */
	JSONArray getFundTable();
	
	
}
